package com.study.demo.gsbean.demo8;

/**
 * @author: elvin
 * @time: 2019-05-16 09:33
 * @desc:
 **/
public abstract class AbstractRun implements IRun {

    private String name;

    public AbstractRun() {
        this("default-xiaoMing");
    }

    public AbstractRun(String name) {
        this.name = name;
    }

    public void run() {
        System.out.println(name + " in abstractRun run...");
        drink();
        takeAShower();
    }


    public abstract void drink();

    public void takeAShower(){
        System.out.println(name + " in abstractRun take a shower...");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
